/*
*			专用写入监视线程类
*/

#pragma once

#include "CxThread.h"
#include "CxBuffer.h"
#include "CxPort.h"
#include <vector>
using	std::vector;


namespace ImitateTansfer
{

	class CxWriteThread	:	public	ImpCxThread 
	{
	public:
		CxWriteThread(vector<CxPort *>::reference pPort,CxWriteBuffer *pBuffer);
		~CxWriteThread();

	public:

		bool	Begin();					
		bool	Close();					

		bool	Suspend();					
		bool	Continue();

	public:


	protected:

		void				ThreadFunc();
	
	private:
		volatile	 bool							m_spin;

		CxWriteBuffer								*m_Buffer;
		vector<CxPort *>::reference					m_Port;	
	};
}
